package com.property.manage.model.system;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 描述
 *
 * @author lwb
 * @since 2020/7/15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("菜单信息")
public class MenuVo extends Menu implements Comparable<MenuVo> {

    @ApiModelProperty("子菜单")
    private List<MenuVo> children;

    @Override
    public int compareTo(MenuVo o) {
        return this.getWeight().compareTo(o.getWeight());
    }
}
